import { Label } from "types/label";
import { Input, Form } from "antd";

interface SearchPanelProps {
  param: Partial<Pick<Label, "title">>;
  setParam: (param: SearchPanelProps["param"]) => void;
}

export const SearchPanel = ({ param, setParam }: SearchPanelProps) => {
  return (
    <Form layout="inline">
      <Form.Item>
        <Input
          type="text"
          value={param.title}
          onChange={(evt) =>
            setParam({
              ...param,
              title: evt.target.value,
            })
          }
        />
      </Form.Item>
    </Form>
  );
};
